package com.ncloud.auth.service;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@Component
public class TokenConfig {
	@Value("${tokenExpiredTime}")
    private Integer tokenExpiredTime;
	@Value("${refreshTokenExpiredTime}")
    private Integer refreshTokenExpiredTime;
	private String tokenSuffix = "_token";
	private String refreshTokenSuffix = "_refresh_token";
	private String userInfoSuffix = "_userInfo";
	private String separation="_string";
	public String getTokenName(String userID,String roundId) {
		return userID +separation +roundId + tokenSuffix;
	}
	public String getRefreshTokenName(String userID,String roundId) {
		return userID +separation + roundId + refreshTokenSuffix;
	}
	public String getUserInfoName(String userID,String roundId) {
		return userID +separation + roundId + userInfoSuffix;
	}
	public Integer getTokenExpiredTime() {
		return tokenExpiredTime;
	}
	public Integer getRefreshTokenExpiredTime() {
		return refreshTokenExpiredTime;
	}
}
